package Object_3;

public class Duck extends Animal implements ISwimming,IRunning,IFlying  {

    public Duck(String name){
        super(name);
    }
    @Override
    public void fly() {
        System.out.println(getName() + " 用翅膀飞");
    }

    @Override
    public void run() {
        System.out.println(getName() + " 一跳一跳的跑");

    }

    @Override
    public void swim() {
        System.out.println(getName() + " 用两只脚游");

    }
}
